﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model.EntityModel.Auth;
using Model.EntityModel.SysModel;

namespace Repository.IRepository.ISysRepository
{
    public interface IDeptRepository: IBaseRepository<Dept>
    {

        List<Dept> GetDeptHierarchy();
        bool CreateDept(Dept dept);
        bool UpdateDept(Dept dept);
        bool DeptExists(string deptId);
        Dept GetDeptById(string deptId);
        bool DeleteDept(string deptId);
        List<Dept> GetAllDepts();
        /// <summary>
        /// 创建新部门
        /// </summary>
        Task<string> CreateDeptAsync(Dept dept);
        List<Dept> GetDeptTree();
        /// <summary>
        /// 获取部门层级结构
        /// </summary>
        Task<List<Dept>> GetDeptHierarchyAsync();
    }
}
